<template>
  <contents :heightInclude="['tabBar']" class="order_result_page">
    <view v-if="type == 1" class="success_box">
      <image class="success_img" src="@/static/images/qualifications_success.png" />
      <view class="success_msg">{{$t('locales.setQualificationMsg')}}</view>
    </view>
    <view v-if="type == 2" class="success_box">
      <image class="success_img" src="@/static/images/offline_success.png" />
      <view class="success_msg">{{$t('locales.setPayVouMsg')}}</view>
    </view>
    <SubmitBtn :text="$t('locales.viewOrder')" @click="submit" />
  </contents>
</template>
<script>
import SubmitBtn from '@/components/submitBtn'
export default {
  components: {
    SubmitBtn
  },
  data() {
    return {
      type: '',
      orderId: ''
    }
  },
  onLoad(opt) {
    this.type = opt.type
    this.orderId = opt.id
  },
  methods: {
    submit() {
      uni.redirectTo({
        url: '/pages/order/details/index?id=' + this.orderId
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.success_box {
  display: flex;
  flex-direction: column;
  align-items: center;
  .success_img {
    width: 208rpx;
    height: 185rpx;
    margin-top: 150rpx;
    margin-bottom: 50rpx;
  }
  .success_msg {
    font-size: 34rpx;
    font-weight: 500;
  }
}
</style>